import request from '@/utils/request/index.js';
var header1 = 'application/json;charset=UTF-8';
var header2 = 'application/x-www-form-urlencoded;charset=UTF-8';
// #ifdef H5
var jweixin = require('jweixin-module');
// #endif
import state from '@/config.js';

module.exports = {
	// get
	newMessage: (data, success) => {
		return request.get(
			'/cms/cmsFrontend/newsContentpage', {
				data
			},
			success
		)
	},
	// get2
	courseDetail: (id, success, fail, complete) => {
		return request.get2(`/course/api/course/coursebaseinfo/${id}`, {}, success, fail, complete)
	},
	// post
	joinShopingCar: (data, success) => {
		return request.post(
			'/finance/financeshoppingcar', {
				data
			},
			success
		)
	},
	// post2
	getCourseNodeProgressRedis: (data, success, fail, complete) => {
		return request.post2(`/learning/coursenode/getCourseNodeProgressRedis`, {
			data
		}, success, fail, complete)
	},
	// post3
	sendCode: (data, success, fail) => {
		return request.post3(`/admin/sms/send`, {
			data
		}, success, fail, false, false, false, true)
	},
	// upload
	multipartUpload: (filePath, fileType, success, fail) => {
		return request.upload(`/interface/bos/multipartUpload`, filePath, fileType, {}, success, fail)
	},
	// delete
	shoppingcartDelkc: (data, success) => {
		return request.delete('/finance/financeshoppingcar', data, success)
	},
}